package com.net.oil.main.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.main.bean.TechnologyTypeBean;
import com.net.oil.main.contract.TechnologySupportContract;
import com.net.oil.main.model.TechnologySupportModel;

import java.util.List;

/**
 * 作者：lch
 * 时间：2018/4/14 0014:上午 8:59
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class TechnologySupportPresenter extends BasePresenter<TechnologySupportContract.View> implements TechnologySupportContract.Presenter {

    private TechnologySupportContract.View view;
    private TechnologySupportContract.Model model;

    public TechnologySupportPresenter(TechnologySupportContract.View view) {
        this.view = view;
        model = new TechnologySupportModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getTechnologyType() {
        model.getTechnologyType();
    }

    @Override
    public void getTechnologyTypeSuccess(List<TechnologyTypeBean> technologyTypeBeans) {
        view.getTechnologyTypeSuccess(technologyTypeBeans);
    }

    @Override
    public void getTechnologyTypeFailed() {
        view.getTechnologyTypeFailed();
    }
}
